package com.service.websocket.to;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author xianggj
 * @description: 统一返回类
 * @date 2020/4/15 20:07
 */
@Data
@NoArgsConstructor
public class ResponseObject implements Serializable {

    private static final long serialVersionUID = -16923452391234397L;

    /**
     * 成功消息
     */
    public static final String SUCCESS_MESSAGE = "success";

    /**
     * 参数错误消息
     */
    public static final String PARAMS_MESSAGE = "参数错误";

    /**
     * 返回状态
     */
    private int status;
    /**
     * 状态描述信息
     */
    private String message;
    /**
     * 返回数据
     */
    private Object data;


    public ResponseObject(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public ResponseObject(int status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

}
